package com.baizhi.controller;


import com.baizhi.service.ICategoryService;
import com.baizhi.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 商品三级分类 前端控制器
 * </p>
 *
 * @author huiJie
 * @since 2021-08-31
 */
@RestController
@RequestMapping("/category")
public class CategoryController {
    @Autowired
    private ICategoryService categoryService;
    @GetMapping("/categoryTree")
    public R showLevel(){
        return R.ok(categoryService.showCategoryByLevel());
    }
}

